/**
Copyright 2011 Patrick Devaney

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



Perimeter, Area, Volume, etc. Calculator
By: Patrick Devaney
Created: October 29th, 2011
Revision: Beta 4
Changes:
-Added surface area


TODO:
-Find a way to get pi to a higher precision than 3.14159
-Attempt to implement OOP.
-Make perimeter of a custom shape work
-Move while loop for all 3 calcs into it's own .cpp file as a function
-Add support for pentagons, hexagons, octagons, decagons?
-Add pyramids
-Implement surface area for triangular and trapezoidal prisms
*/
#include <iostream>
#include <string.h>
#include "area.cpp"
#include "perimeter.cpp"
#include "volume.cpp"
#include "surfacearea.cpp"
using namespace std;
/*
File Purpose:
To act as a "glue", only this time the file split won't be
quite so messy.
*/

int main(int argc, const char* argv[]) {
string abc;
int def;
def = 0;
cout << "PAVEC: Perimeter, Area, Volume, etc. Calculator"
<< endl << "Beta 4, Copyright (c) 2011 Patrick Devaney" << endl
<< "Licensed under the Apache License Version 2" << endl;
while (def < 1) {
cout << "Do you want to calculate:" << endl << "1 - Area" << endl
<< "2 - Perimeter" << endl << "3 - Volume" << endl << "4 - Surface Area" << endl;
cin >> abc;
if (abc == "1") {
area();
def++;
}

else if (abc == "2") {
perimeter();
def++;
}

else if (abc == "3") {
volume();
def++;
}

else if (abc == "4") {
surfacearea();
def++;
}

// End of the loop
}
return 0;

// End of the main() function
}